namespace Terra.Core.Common.ErrorCodes.Models;

/// <summary>
/// 错误响应
/// </summary>
public class ErrorResponse
{
    /// <summary>
    /// 错误码
    /// </summary>
    public string Code { get; set; }

    /// <summary>
    /// 错误消息
    /// </summary>
    public string Message { get; set; }

    /// <summary>
    /// 错误级别
    /// </summary>
    public ErrorSeverity Severity { get; set; }
}

/// <summary>
/// 带数据的错误响应
/// </summary>
/// <typeparam name="T">数据类型</typeparam>
public class ErrorResponse<T> : ErrorResponse
{
    /// <summary>
    /// 附加数据
    /// </summary>
    public T Data { get; set; }
}